{extend name="wap/b2c/base" /} 
{block name="resources"}
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/common.css">
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/Components.css">
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/category.css">
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/groupGoodsList.css">
<script language="javascript" src="__TEMP__/{$style}/public/js/goods_list.js" type="text/javascript"></script>
<style>

.openList li dd {
    width: 90%;
}
.openList li dl dt {
    font-size: 14px;
    width: 90%;
    height: 20px;
    overflow: hidden;
}
.openList .goods-sales {
    font-size: 12px;
}
.openList li dd i {
    font-size: 14px;
}
.custom-search{
	width:90%;
	margin-left:20px;	
}
.custom-search .custom-search-input{
	width:97%;
}
.custom-search-button{
	height:50px;
}
</style>
{/block}
 {block name="goodsHead"}
<section class="head">
	<a class="head_back" onclick="window.history.go(-1)" href="javascript:void(0)"><i class="icon-back"></i></a>
	<div class="head-title">{include file='wap/b2c/Index/controlSearch'/}</div>
	
</section>
{/block} 
{block name="main"}
<div id="index_content">
<!--列表页内容start-->
<section class="category-content-section">
	<section class="filtrate-term ">
		<ul>
			<li class="cur"><a href="javascript:void(0)">综合排序</a></li>
			<!--排序点击li标签增加样式cur；span标签增加样式active_down-->
			<li class="">
				<a href="javascript:void(0);" class="filtrate-sort">
					<em>排序</em>
					<span class="arrow_down arrow"></span>
				</a>
			</li>
		<!-- 	<li class="filtrate">
				<a href="javascript:void(0);">
					筛选
					<i class="iconfont"></i>
				</a>
			</li> -->
		</ul>
	</section>
	<div class="mask-div"></div>
	<div class="filtrate-more hide sale-num">
		<span><a href="javascript:void(0)" data-sort="1" data-name="销量" class=""> 销量 </a></span>
		<span><a href="javascript:void(0)" data-sort="2" data-name="新品" class=""> 新品 </a></span>
		<span><a href="javascript:void(0)" data-sort="3" data-name="价格" class=""> 价格 </a></span>
		<input type="hidden" id='order' name="order"  />
		<input type="hidden" id='category_id' name='category_id' value="{$category_id}" />
	</div>
	<!--goods_grid布局start-->
	<div class="goods-list-grid openList">
		<div class="blank-div"></div>
		<div id="goods_list">
			<div class="tablelist-append clearfix"></div>
		</div>
	</div>
</section>
<!--底部菜单 start-->
</div>
{/block}
{block name="bottom"}{/block}
{block name="javascript"}
<script type="text/javascript">
$(function(){
	getgoodlist()
})
function getgoodlist(){
	$('#grouGoodsListmask').hide();
	$('.two-list-menu').hide();
	$('.two-list-menu li[pid]').hide();
	var order=$('.filtrate-more span a.current').attr('data-sort');
	var sort=$(".filtrate-more").find("input[name='order']").val();
	$.ajax({
		type:"post",
		url : "APP_MAIN/Goods/goodsList",
		async : true,
		data : {'category_id':'{$category_id}','brand_id':'{$brand_id}','order':order,'sort':sort },
		beforeSend:function(){
			showLoadMaskLayer();
		},
		success : function(data){
			var list_html="";
			for(var i=0;i<data['data'].length;i++){
				var item=data['data'][i];	
				list_html+='<div class="product single_item info">'
					+'<li>'
					+'<div class="item">'
					+'	<div class="item-tag-box">'
					+'	<!--热卖icon位置为：0px 0px，新品icon位置为：0px -35px，精品icon位置：0px -70px-->'
					+'</div>'
					+'<div class="item-pic">'
					+'	<a href="APP_MAIN/Goods/goodsDetail.html?id='+item.goods_id+'">'
					+'<img class="" src="__UPLOAD__/'+item.pic_cover_mid+'"  alt="'+item.goods_name+'" style="display: block;max-width:100%;max-height:100%;">'
					+'	</a>'	
					+'</div>'
					+'<dl>'
					+'	<dt>'
					+'		<a href="APP_MAIN/Goods/goodsDetail.html?id='+item.goods_id+'">'+item.goods_name+'</a>'
					+'	</dt>'
//					+'	<a class="shop-name" href="/shop/3.html">';
// 					+'		<i class="iconfont color"></i>';
// 					list_html+=(item.shop_type==1)?'自营':'普通';
					
//					list_html+='		</a>'
					+'		<dd>'
					+'			<i>￥'+item.promotion_price+'</i>'
					+'		</dd>'
					+'	</dl>'
					+'</div>'
					+'<div class="item-con-info">'
					+'<span class="goods-sales"> 销量：'+item.sales+'</span>'
					+'<div class="cart-box" id="number_575">'
					+'<a class="add-cart increase" data-goods_id="575" href="javascript:CartGoodsInfo('+item.goods_id+')"></a>'
					+'	<a class="decrease hide" data-goods_id="575" style="right: 60px;"></a>'
					+'</div></div></li></div>';
			}
			$('.tablelist-append').html(list_html);
			updateLoadMaskLayerHeight($(document).height());
			hiddenLoadMaskLayer();
		}
	});
}
</script>
{/block}